package com.yugao.fintech.antelope.auth.constants;

import lombok.Getter;

/**
 * 需要发送验证码的操作类型, 比如用户注册, 用户登录等等
 */
@Getter
public enum SmsEnum {
    USER_LOGIN(1, "1"),
    ;

    private final int type;
    private final String templateId;

    SmsEnum(int type, String templateId) {
        this.type = type;
        this.templateId = templateId;
    }

    public static SmsEnum get(Integer type) {
        for (SmsEnum value : SmsEnum.values()) {
            if (value.type == type) {
                return value;
            }
        }
        return null;
    }
}
